x86: put_page_from_l2e() should honor _PAGE_RW
authorJan Beulich <jbeulich@suse.com>
Tue, 9 Oct 2018 14:27:59 +0000 (16:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 9 Oct 2018 14:27:59 +0000 (16:27 +0200)
commitcd395b1d69a773556d2af206b4ecbf56b33057ea
tree94e27fa497136c2b791351cf8d609fec9df9aec5
parente9be34be5f9a1a6ecbf05ba9502cd705ae441476
x86: put_page_from_l2e() should honor _PAGE_RW

56fff3e5e9 ("x86: nuke PV superpage option and code") has introduced a
(luckily latent only) bug here, in that it didn't make reference
dropping dependent on whether the page was mapped writable. The only
current source of large page mappings for PV domains is the Dom0
builder, which only produces writeable ones.

Take the opportunity and also convert to bool both put_data_page()'s
respective parameter and the argument put_page_from_l3e() passes.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/mm.c